﻿@page "/Revise/{id}"
@using CarlifeService;
@using ICarlifeService;

@using Models;
@inject NavigationManager NavigationManager
@inject IKeHuGuanXi services;
<h3>Revise</h3>


<table class="table table-bordered tab-content">
    <tr>
		<td style="text-align:center;padding:35px;background-color:#e9ecef"><h2>项目来源</h2> </td>
        <td>
            <div>
                <input type="radio" name="source" id="optionsRadios1"
                       value="1">客户介绍
                <input type="radio" name="source" id="optionsRadios2"
                       value="2">朋友介绍

            </div>
            <div>
                <input type="radio" name="source" id="optionsRadios3"
                       value="3">电话推广
                <input type="radio" name="source" id="optionsRadios4"
                       value="4">其他
            </div>
            <div>
                <input type="radio" name="source" id="optionsRadios5"
                       value="5">售商介绍
            </div>
        </td>
	</tr>
</table>

<h1> 身份特征 </h1>
<table class="table table-bordered" style="" width="80%">
    <thead>
        @foreach (var item in client)
        {
            <tr style="border:1px solid;padding:100px">
                <td style="text-align:center;padding:35px;background-color:#e9ecef "><h4>客户名称</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.ClientName</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef "><h4>联系方式</h4></td>
                <td style="text-align:center;padding:35px"><h5> @item.Phone </h5></td>
            </tr>
        }
        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>性别</h4></td>
                <td style="text-align:center;padding:35px">
                    <h5>
                        <input type="radio" name="source" id="@item.Sex"
                           value="男">男
                        <input type="radio" name="source" id="@item.Sex"
                           value="女">女
                    </h5>
                  
                       </td>
                         
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>身份证号码</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.IdNumber</h5></td>
            </tr>
        }

        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>婚姻状况</h4></td>
                <td style="text-align:center;padding:35px">
                    <h5>
                          <input type="radio" name="source" id="@item.Sex"
                       value="男">男
                    <input type="radio" name="source" id="@item.Sex"
                       value="女">女
                    <input type="radio" name="source" id="@item.Marriage"
                       value="已婚">已婚
                    <input type="radio" name="source" id="@item.Marriage"
                       value="未婚">未婚
                    <input type="radio" name="source" id="@item.Marriage"
                       value="离异">离异
                    </h5>
                  

                </td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>驾龄情况（年）</h4></td>
                <td style="text-align:center;padding:35px">
                    <h5>
                        <input type="radio" name="source" id="@item.Sex"
                           value="2年一下">2年一下
                        <input type="radio" name="source" id="@item.Sex"
                           value="2-3年">2-3年
                        <input type="radio" name="source" id="@item.Sex"
                           value="3-5年">3-5年
                        <input type="radio" name="source" id="@item.Sex"
                           value="5年以上">5年以上
                    </h5>
                   
                </td>
            </tr>
        }

        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>居住地址</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.ResidentialAddress</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>居住时间（年）</h4></td>
                <td style="text-align:center;padding:35px">
                    <h5>
                        <input type="radio" name="source" id="@item.LengthOfStay"
                           value="2年以下">2年以下
                        <input type="radio" name="source" id="@item.LengthOfStay"
                           value="2-3年">2-3年
                        <input type="radio" name="source" id="@item.LengthOfStay"
                           value="3-5年">3-5年
                        <input type="radio" name="source" id="@item.LengthOfStay"
                           value="5年以上">5年以上

                    </h5>
                 
                </td>
            </tr>
        }

        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>工作单位</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Workplace</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>工作时间（年）</h4></td>
                <td style="text-align:center;padding:35px">
                    <h5>
                         <input type="radio" name="source" id="@item.workingHours"
                           value="2年以下">2年以下
                    <input type="radio" name="source" id="@item.workingHours"
                       value="2-3年">2-3年
                    <input type="radio" name="source" id="@item.workingHours"
                       value="3-5年">3-5年
                    <input type="radio" name="source" id="@item.workingHours"
                       value="5年以上">5年以上
                    </h5>
                    
                </td>
            </tr>
        }

        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>部门</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Department</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>职位</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Posts</h5></td>
            </tr>
        }

    </thead>

</table>


<h1> 社交关系 </h1>

<table class="table table-bordered" style="" width="80%">
    <thead>
        @foreach (var item in client)
        {
            <tr style="border:1px solid;padding:100px">
                <td style="text-align:center;padding:35px;background-color:#e9ecef "><h4>家庭成员</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.FamilyMembers</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef "><h4>联系方式</h4></td>
                <td style="text-align:center;padding:35px"><h5> @item.SContact </h5></td>
            </tr>
        }
        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>关系</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Relationship</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>身份证号码</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Sidentitycard</h5></td>
            </tr>
        }

        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>月收入（元）</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.MonthlyIncome</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>工作职务</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.JobTitle</h5></td>
            </tr>
        }

        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>子女情况</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Children</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>是否担保</h4></td>
                <td style="text-align:center;padding:35px"><h5>
                        <input type="radio" name="source" id="@item.Sex"
                           value="是">是
                        <input type="radio" name="source" id="@item.Sex"
                           value="否">否

                </h5></td>
            </tr>
        }

        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>非配偶紧急联系人</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Urgent</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>联系方式</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.SContact </h5></td>
            </tr>
        }

        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:24px;background-color:#e9ecef"><h4>通讯好友</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.FamilyMembers</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>关系</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Relationship</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>联系方式</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.SContact</h5></td>
            </tr>
        }

        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:24px;background-color:#e9ecef"><h4>通讯好友</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.FamilyMembers</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>关系</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Relationship</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>联系方式</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.SContact</h5></td>
            </tr>
        }

        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:24px;background-color:#e9ecef"><h4>通讯好友</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.FamilyMembers</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>关系</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Relationship</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>联系方式</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.SContact</h5></td>
            </tr>
        }

        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:24px;background-color:#e9ecef"><h4>通讯好友</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.FamilyMembers</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>关系</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Relationship</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>联系方式</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.SContact</h5></td>
            </tr>
        }

        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:24px;background-color:#e9ecef"><h4>通讯好友</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.FamilyMembers</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>关系</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Relationship</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>联系方式</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.SContact</h5></td>
            </tr>
        }

    </thead>

</table>
<h1> 履行能力 </h1>

<table class="table table-bordered" style="" width="80%">
    <thead>
        @foreach (var item in client)
        {
            <tr style="border:1px solid;padding:100px">
                <td style="text-align:center;padding:35px;background-color:#e9ecef "><h4>家庭其他收入（元）</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.OtherIncome</h5></td>
                <td style="text-align:center;padding:35px;background-color:#e9ecef "><h4>房屋类型</h4></td>
                <td style="text-align:center;padding:35px"><h5>
                           <input type="radio" name="source" id="@item.workingHours"
                           value="自置（无按揭）">自置（无按揭）
                    <input type="radio" name="source" id="@item.workingHours"
                           value="自置（有按揭）">自置（有按揭）
                    <input type="radio" name="source" id="@item.workingHours"
                           value="租住">租住
                    <input type="radio" name="source" id="@item.workingHours"
                       value="其他">其他
                </h5></td>
            </tr>
        }
        @foreach (var item in client)
        {
            <tr style="border:1px solid">
                <td style="text-align:center;padding:35px;background-color:#e9ecef"><h4>其他描述</h4></td>
                <td style="text-align:center;padding:35px"><h5>@item.Description</h5></td>
              
            </tr>
        }

    </thead>

</table>


@code {
    [Parameter]
    public string id { get; set; }
    List<ClientDTO> client = new List<ClientDTO>();
    public List<ClientDTO> KeHuBianJi { get; set; } = new List<ClientDTO>();

    protected override async Task OnInitializedAsync()
    {
        client = services.ClientBackfill(Convert.ToInt32(id));

        await base.OnInitializedAsync();

    }


}
